package com.lsl.optional;

import com.lsl.stream.Employee;
import org.junit.Test;

import java.util.Optional;

/**
 * @author lishuailong
 * @create 2020-07-22 16:06
 */
public class test {
    @Test
    public void test(){
        Employee employee = new Employee();
        Optional<Employee> optional = Optional.of(employee);
        optional.ifPresent(employee1 -> employee1.getAge());

    }
}
